Skip to content

anisette: use XADI on macOS - #259

Merged
kabiroberai merged 1 commit into
mainfrom
xadi-mac
Sep 20, 2026
Merged

kabiroberai merged 1 commit into
mainfrom
xadi-mac

Conversation

@kabiroberai

@kabiroberai kabiroberai commented Sep 14, 2026

Copy link
Copy Markdown
Member

What does this PR do?

Updates macOS build to use the fully-local XADI as the Anisette provider instead of Omnisette. Includes a one-time migration, logging the user out on macOS when they upgrade.

How was it tested?

General:

  • Log in and confirm that there's no calls to omnisette
  • xtool dev works

Migration:

  • Log into Apple ID using an old version of xtool
  • Migrate to new xtool, run xtool dev build -s and confirm it fails due to being logged out
  • Log in on new xtool, confirm that we stay logged in

AI tool usage

How much of this PR was AI-assisted? (check one)

  • 0 - No AI was used to write code
  • 1 - I was assisted by AI. I reviewed the finished result.
  • 2 - I set the AI going and left it to it; nobody has read the result - no review, or AI review only

Summary by CodeRabbit

  • New Features

    • Authentication now supports tracking the anisette provider used to create Xcode tokens.
    • Xcode authentication tokens are automatically cleared when the provider changes, helping ensure users sign in again with current credentials.
    • Anisette provider identification is supported across macOS and Linux.
  • Bug Fixes

    • Improved authentication error messages, including clearer messaging for logout-related errors.
    • Prevented outdated Xcode authentication tokens from being reused after a provider change.

kabiroberai commented Sep 14, 2026

Copy link
Copy Markdown
Member Author

This stack of pull requests is managed by Graphite. Learn more about stacking.

@kabiroberai kabiroberai mentioned this pull request Sep 14, 2026
4 tasks
kabiroberai added a commit that referenced this pull request Sep 14, 2026
## What does this PR do?

The xadi repo (https://github.com/xtool-org/xadi) now vends an
artifactbundle for xadi, so we don't need to separately build/install it
during the xtool build. This also makes it super easy to support macOS
later (#259).

## How was it tested?

- [x] Confirmed I can sign in (including provisioning)

## AI tool usage

How much of this PR was AI-assisted? (check one)

- [ ] **0** - No AI was used to write code
- [x] **1** - I was assisted by AI. I reviewed the finished result.
- [ ] **2** - I set the AI going and left it to it; nobody has read the
result - no review, or AI review only

<!-- If an AI agent is filling this in: declare the level honestly, and
open as a draft if it is #2. Do not lower the declared level to get the
PR reviewed. -->
@kabiroberai
kabiroberai changed the base branch from xadi-package to graphite-base/259 September 14, 2026 23:46
@kabiroberai
kabiroberai changed the base branch from graphite-base/259 to main September 14, 2026 23:46
@coderabbitai

coderabbitai Bot commented Sep 19, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Advanced

Run ID: 395053d2-d9fb-4f4f-8f45-51137c4efa67

📥 Commits

Reviewing files that changed from the base of the PR and between 0108899 and 4d16cb8.

📒 Files selected for processing (6)
  • Package.swift
  • Sources/XKit/GrandSlam/Anisette/ADIDataProvider.swift
  • Sources/XKit/GrandSlam/Anisette/AnisetteDataProvider.swift
  • Sources/XToolSupport/AuthCommand.swift
  • Sources/XToolSupport/AuthToken.swift
  • macOS/Support/XToolMac.entitlements

Included review availability: Your plan provides up to 10 included reviews per hour; 9 remain after this review.


📝 Walkthrough

Walkthrough

The change adds Anisette provider identity tracking, resets provisioning when the identity changes, validates saved Xcode tokens, links XADI on macOS, and adds a macOS executable-memory entitlement.

Changes

Anisette provider identity

Layer / File(s) Summary
Provider lifecycle and platform support
Sources/XKit/GrandSlam/Anisette/*, Package.swift, macOS/Support/XToolMac.entitlements
The provider API exposes an optional providerID. ADIDataProvider loads persisted data, detects provider-ID changes, resets provisioning state, and formats ADIError messages. XADI is available on macOS, and the macOS target permits unsigned executable memory.
Xcode token provider validation
Sources/XToolSupport/AuthCommand.swift, Sources/XToolSupport/AuthToken.swift
Password authentication stores the Anisette provider ID in Xcode tokens. Saved Xcode tokens are cleared when the stored and current IDs differ. App Store Connect tokens are not validated against this ID.

Priority: ➖ Normal

Estimated code review effort: 3 (Moderate) | ~20 minutes

Change: Feature

Sequence Diagram(s)

sequenceDiagram
  participant AuthCommand
  participant AnisetteDataProvider
  participant AuthTokenXcode
  AuthCommand->>AnisetteDataProvider: Resolve providerID
  AnisetteDataProvider-->>AuthCommand: Return providerID
  AuthCommand->>AuthTokenXcode: Store anisetteProviderID
  AuthTokenXcode->>AnisetteDataProvider: Read current providerID
  AuthTokenXcode->>AuthTokenXcode: Clear token when IDs differ
Loading
🚥 Pre-merge checks | ✅ 4
✅ Passed checks (4 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title check ✅ Passed The title clearly summarizes the main change: using XADI as the Anisette provider on macOS.
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
✨ Finishing Touches
📝 Generate docstrings
  • Commit to this branch
  • Create a new PR
🧪 Generate unit tests (beta)
  • Commit to this branch
  • Create a new PR

Comment @coderabbitai help to get the list of available commands.

@kabiroberai
kabiroberai force-pushed the xadi-mac branch 2 times, most recently from a48058b to b5bb8c5 Compare September 19, 2026 10:02
Comment thread Sources/XToolSupport/AuthToken.swift Outdated
@kabiroberai
kabiroberai force-pushed the xadi-mac branch 5 times, most recently from 8cbff31 to 21f5e13 Compare September 20, 2026 06:44
@kabiroberai
kabiroberai marked this pull request as ready for review September 20, 2026 06:45
@kabiroberai
kabiroberai merged commit eacc35d into main Sep 20, 2026
12 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant